#include "Shm.hpp"
#include "nameenPip.hpp"

int main()
{
    // 1、先创建共享内存
    Shm shm(gpathname, gproj_id, gCreater);
    char *shmaddr = (char*)shm.Addr();

    // 2、再创建管道
    NamePipe fifo(comm_path, Creater);


    while(true)
    {
        std::string tmp;
        fifo.ReadNamePipe(&tmp);

        std::cout << "shm memory content: " << shmaddr << std::endl;
    }

    return 0;    
}